import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { CompanyList } from '../../types'

export const useCompanyStore = defineStore('company', ()=>{
  const company = ref<CompanyList[]>([])
  const setCompany = (list:CompanyList[])=>{
    company.value = list
  }
  const removeCompany = ()=>{
    company.value = []
  }
  return { company,setCompany,removeCompany}
},{
  persist:true
}
)